<?php
$this->pageTitle = Yii::app()->name . ' - ' . UserModule::t("Login");
$this->breadcrumbs = array(
    UserModule::t("Login"),
);
?>
<?php /*
  <h1><?php echo UserModule::t("Login"); ?></h1>

  <?php if (Yii::app()->user->hasFlash('loginMessage')): ?>

  <div class="success">
  <?php echo Yii::app()->user->getFlash('loginMessage'); ?>
  </div>

  <?php endif; ?>

  <p><?php echo UserModule::t("Please fill out the following form with your login credentials:"); ?></p>

  <div class="form">
  <?php echo CHtml::beginForm(); ?>

  <p class="note"><?php echo UserModule::t('Fields with <span class="required">*</span> are required.'); ?></p>

  <?php echo CHtml::errorSummary($model); ?>

  <div class="row">
  <?php echo CHtml::activeLabelEx($model, 'username'); ?>
  <?php echo CHtml::activeTextField($model, 'username') ?>
  </div>

  <div class="row">
  <?php echo CHtml::activeLabelEx($model, 'password'); ?>
  <?php echo CHtml::activePasswordField($model, 'password') ?>
  </div>

  <div class="row">
  <p class="hint">
  <?php echo CHtml::link(UserModule::t("Register"), Yii::app()->getModule('user')->registrationUrl); ?> | <?php echo CHtml::link(UserModule::t("Lost Password?"), Yii::app()->getModule('user')->recoveryUrl); ?>
  </p>
  </div>

  <div class="row rememberMe">
  <?php echo CHtml::activeCheckBox($model, 'rememberMe'); ?>
  <?php echo CHtml::activeLabelEx($model, 'rememberMe'); ?>
  </div>

  <div class="row submit">
  <?php echo CHtml::submitButton(UserModule::t("Login")); ?>
  </div>

  <?php echo CHtml::endForm(); ?>
  </div><!-- form -->

  <?php
  $form = new CForm(array(
  'elements' => array(
  'username' => array(
  'type' => 'text',
  'maxlength' => 32,
  ),
  'password' => array(
  'type' => 'password',
  'maxlength' => 32,
  ),
  'rememberMe' => array(
  'type' => 'checkbox',
  )
  ),
  'buttons' => array(
  'login' => array(
  'type' => 'submit',
  'label' => 'Login',
  ),
  ),
  ), $model);
 */ ?>

<h1><?php echo UserModule::t("Login"); ?></h1>
<p><?php echo UserModule::t("Please fill out the following form with your login credentials:"); ?></p>
<p><?php echo UserModule::t('Fields with <span class="required">*</span> are required.'); ?></p>
<div class="form-actions">
    <?php
    $form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
        'id' => 'login-form',
        'type' => 'vertical',
        'enableClientValidation' => true,
        'htmlOptions' => array('class' => 'span3 offset4 well', 'align'=>'center'),
        'clientOptions' => array(
            'validateOnSubmit' => true,
        ),
    ));
    ?>

    <?php echo $form->textFieldRow($model, 'username'); ?>
    <?php echo $form->passwordFieldRow($model, 'password', array('')); ?>
    <p class="note"><?php echo CHtml::link(UserModule::t("Register"), Yii::app()->getModule('user')->registrationUrl); ?> | 
        <?php echo CHtml::link(UserModule::t("Lost Password?"), Yii::app()->getModule('user')->recoveryUrl); ?></p>
    <p class="note"><?php echo $form->checkBoxRow($model, 'rememberMe'); ?>
    </p>
    <?php
    $this->widget('bootstrap.widgets.TbButton', array(
        'buttonType' => 'submit',
        'type' => 'primary',
        'label' => UserModule::t('Login'),
    ));
    ?>
    <?php $this->endWidget(); ?>
</div>
